﻿@using ExcellOnServices.Models
@model Product

@if (Model != null) { 
	<h4><strong>@Model.Name</strong></h4>
	<div>
		<img src="@Model.ImageUrl" class="pull-left product-img" />
		@if (Model.Discount > 0) {
			var SalePrice = Model.Price - Model.Discount;
			var DiscountRate = Math.Ceiling(Model.Discount / Model.Price * 100);
			<span class="product-price">@String.Format("{0:C}", SalePrice)</span>
			@:Old price for <span class="product-old-price">@String.Format("{0:C}", Model.Price)</span>
			<br />
			<br />
			@:currently save up to <span class="product-discount">@DiscountRate %</span>
	} else {
			<span class="product-price">@String.Format("{0:C}", Model.Price)</span>
		}
	</div>

	<div class="clearfix"></div>
	<br />

	@Html.Raw(Model.Description)
} else {
	<img src="~/Resources/img/contact_us.png" id="contact_us" />
}


